package org.jeecg.modules.rental.service.impl;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.shiro.SecurityUtils;
import org.jeecg.common.model.EnumDictOption;
import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.modules.rental.entity.RentalArticleCategory;
import org.jeecg.modules.rental.mapper.RentalArticleCategoryMapper;
import org.jeecg.modules.rental.service.IRentalArticleCategoryService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description: rental_article_category
 * @Author: jeecg-boot
 * @Date:   2024-06-20
 * @Version: V1.0
 */
@Service
public class RentalArticleCategoryServiceImpl extends ServiceImpl<RentalArticleCategoryMapper, RentalArticleCategory> implements IRentalArticleCategoryService {

    @Override
    public List<EnumDictOption> options() {
        LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
        return baseMapper.options(loginUser.getOrgCode());
    }

    @Override
    public IPage<RentalArticleCategory> selectJoinPage(Page page, RentalArticleCategory articleCategory) {
        return baseMapper.selectJoinPage(page, articleCategory);
    }
}
